home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / text / hints / volume_06 / issue11 < prev    next >
Text File  |  1995-02-16  |  27KB  |  638 lines

  1. Hints and Tips
  2. 6.11
  3. •    Amstrad CPC monitor link − Let me describe how to use the old monitor
  4. left over from your Amstrad CPC for emergency use with your Archimedes.
  5. 6.11
  6. You need a six-pin, 270-degree DIN female plug, like the one in your
  7. CPC, a normal D-sub nine-pin male, to plug into your RGB socket on the
  8. computer and some soldering skill. (If you use an A5000 or later, you
  9. need a 15-pin VGA-compatible plug, instead.)
  10. 6.11
  11. To make the setup even more user-friendly, you should invest in a two-
  12. way, double switch, to cater for both mono and colour monitors.
  13. 6.11
  14. The DIN plug has six pins, with the centre pin being mono-in. When seen
  15. from the rear with the soldering lugs towards you, (as in the diagram
  16. opposite) the pin for the red is top left (1), then comes green (2),
  17. blue (3), sync (4) and signal earth (5).
  18. 6.11
  19. On the 9-pin D-sub, pin number 1 is red, 2 is green and 3 is blue. Pin
  20. number 4 is sync and 7 signal earth. The rest are unused. The
  21. arrangement on the new machines is slightly different, as there are more
  22. pins, but it is essentially the same!
  23. 6.11
  24. Basically you connect 1 to 1, 2 to 2 and 3 to 3, but the addition of a
  25. switch makes it much more useful. Before starting, switch on the
  26. computer while pressing <0>, to change to monitortype 0 for 50Hz
  27. monitors and TVs.
  28. 6.11
  29. The switch on the cable is essential under two circumstances: You might
  30. also want to use your TV as a colour monitor. Then you have to use the
  31. Amstrad TV MP-2 modulator (still available). That does not use the
  32. central monochrome pin, but the normal three RGB pins. You could make
  33. two converters of course, but you might forget which is which. Instead,
  34. you just flip the switch if the picture looks odd! Those with TVs that
  35. accept RGB through the SCART connector should use those, of course!
  36. A3010 owners should first try connecting to a TV, but the green CPC
  37. monitor should be much sharper, if not having a higher resolution!
  38. 6.11
  39. Sometimes, when running some games like MiG-29M, you might want to
  40. switch back and forth as the headup display is almost invisible against
  41. the sky if you have all colours connected to the middle pin. By
  42. momentarily switching to the colour setting, everything yellow will
  43. become easily visible, as it becomes black (or more correctly, a black-
  44. ish green, if you use the green monochrome monitor)!
  45. 6.11
  46. Turbo Challenge II becomes a real challenge in green. Chopper Force,
  47. Bughunter II and Taipei work fine in green. Impression, Vector and
  48. ArtWorks are essentially monochrome, if you don’t add colour yourself,
  49. so they are not affected!  Tord Eriksson
  50. 6.11
  51. •    BASIC64 application − I have, for a long time, toyed with the idea of
  52. testing BASIC64, by running the PCW Benchmarks with it. The normal way
  53. would be to RMLoad the BASIC64 module and then type *BASIC64 − not very
  54. user-friendly, as you have to type in the paths each time.
  55. 6.11
  56. Remembering David Pilling’s advice on the uses of the OSCLI command
  57. (very odd to me, brought up on Spectrums and mainframes!) I wrote the
  58. following Basic lines:
  59. 6.11
  60. *DIR SCSI::Conner170M
  61. 6.11
  62. *DIR OldRubbish.BASIC.BenchMARK
  63. 6.11
  64. *CAT
  65. 6.11
  66. INPUT “Which file? ”;a$
  67. 6.11
  68. OSCLI “*BASIC64 -quit ” + a$
  69. 6.11
  70. The *CAT shows me which files are available and OSCLI “*BASIC64 -quit”
  71. loads BASIC64 runs the program a$ and then quits. Your version will have
  72. to include your drives and directories, of course! This programming
  73. fragment, I called !RunImage.
  74. 6.11
  75. Put this in the directory you have made called !Run64.
  76. 6.11
  77. To make this an application, steal some !Sprites from a program you
  78. like, rename the individual icon sprites to !Run64 and sm!Run64.
  79. 6.11
  80. The next step is to make a copy of BASIC64 and drop that into the
  81. directory. Now for the !Run file:
  82. 6.11
  83. Iconsprites <Obey$Dir>.!Sprites
  84. 6.11
  85. RUN <Obey$Dir>.BASIC64 -QUIT <Obey$Dir>.!RunImage
  86. 6.11
  87. Alternatively, you could run the copy of BASIC64 that you might have in
  88. your system’s modules directory.
  89. 6.11
  90. It seems idiotic to run BASIC64, in order to run BASIC64, to run the
  91. program you have selected, but it works perfectly.
  92. 6.11
  93. I tried using the more logical *RMLoad BASIC64, but then you fall into
  94. the editor and we do not want that!
  95. 6.11
  96. Finally, you need a !Boot file:
  97. 6.11
  98. Iconsprites <obey$Dir>.!Sprites
  99. 6.11
  100. (A sample Basic64 application is on this month’s program disc.)  Tord
  101. Eriksson
  102. 6.11
  103. •    ColourCard and VIDC software − After I had installed my ColourCard and
  104. (thanks to a hint in Archive) realised that I still would have to use a
  105. VIDC module (Careware 18) to make my monitor display modes 12 and 15, a
  106. problem arose. I had configured my machine to one of those wonderfully
  107. large screen modes (1152×848 logical pixels), and then when I found the
  108. time to play a mode 15 game, (Tower of Babel, which is completely mouse-
  109. controlled), there was no pointer!
  110. 6.11
  111. This is what Nigel Star of Wild Vision told me: In a ColourCard mode,
  112. the VIDC pointer is disabled and some games don’t re-enable it so all
  113. you have to do is switch to mode 15 first, and only then start the
  114. game.  Jochen Konietzko, Köln.
  115. 6.11
  116. •    Combatting fiddlers − A solution for teachers who suffer from children
  117. ‘fiddling’ with the palette, task windows, applications accessing the
  118. hard disc and destroying files might be to use the RMKill command in the
  119. !Boot file. Any or all of the following lines can be added to the !Boot
  120. file.
  121. 6.11
  122. RMKill ResourseFiler
  123. 6.11
  124. RMKill ADFSFiler
  125. 6.11
  126. RMKill PaletteUtil
  127. 6.11
  128. RMKill Taskmanager
  129. 6.11
  130. This will leave the iconbar empty. Pressing <reset> will give error
  131. messages. If you want a particular program to run, this could be done
  132. from the !Boot file or from an application launcher such as !Menon or
  133. !Two. Directories can be opened in the same way. Switching on whilst
  134. holding down <shift> avoids running the !Boot file and returns icons to
  135. the iconbar.  Paul Harrigan, Hong Kong.
  136. 6.11
  137. •    DragASprite module − After seeing the tip on the dragging of solid
  138. sprites from a previous Archive, I decided to explore the DragASprite
  139. module for myself. I have not worked on it exhaustively but I have come
  140. across the following which users could put in their Basic programs.
  141. 6.11
  142. The DragASprite module supports two SWIs but the more useful of these
  143. two is the SWI DragASprite_Start. It requires the following parameters:
  144. 6.11
  145. R0    control value
  146. 6.11
  147. R1    1 (this seems to be the only value that works)
  148. 6.11
  149. R2    pointer to sprite name
  150. 6.11
  151. R3    points to start coordinates of the drag box
  152. 6.11
  153. The control value consists of bits which affect the drag. The only ones
  154. I have worked out are:
  155. 6.11
  156. bit 6    allow dragging outside graphics window
  157. 6.11
  158. bit 7    shadow the sprite
  159. 6.11
  160. Bits 0 and 4 seem to allow only the value 5, as far as I can work out.
  161. 6.11
  162. I have found that the two most useful values for the control value in R0
  163. are:
  164. 6.11
  165. &85    non-shadowed drag outside the graphics window
  166. 6.11
  167. &C5    shadowed drag outside the graphics window
  168. 6.11
  169. R2 points to the first character of a string which is the name of the
  170. sprite to be used for the drag, for example “file_fec”.
  171. 6.11
  172. R3 points to four 32-bit coordinates which describe the start and size
  173. of the drag box (which is the same size as the sprite).
  174. 6.11
  175. This is about all I have been able to work out in the time I have spent
  176. on it, but it is possible to modify Basic programs using the Save As
  177. window to use DragASprite_Start instead of Wimp_ DragBox.
  178. 6.11
  179. For example, in FormEd 1.24, modify line 4810, which normally reads:
  180. 6.11
  181. 4810 SYS “Wimp_DragBox”,,q%
  182. 6.11
  183. to
  184. 6.11
  185. 4810 SYS “DragASprite_Start”,&C5 ,1,“File_fec”,q%+8
  186. 6.11
  187. I’m sure a similar fix could be used for other programs to give solid
  188. sprite dragging.  Robin Terry, Newcastle upon Tyne.
  189. 6.11
  190. (Those who can afford £100 for a RISC OS 3 PRM will find more details on
  191. page 3-299. Ed.)
  192. 6.11
  193. •    Free space on hard discs − In Hints and Tips, Archive 5.12, Steve
  194. Drain asked if the same problem of allocating 28Kb to each new directory
  195. applies to IDE drives. I checked this for my A5000 40Mb drive and found
  196. that 7Kb is allocated per directory which seems a reasonable compromise.
  197. This is lucky as there seems to be no way to alter the default format
  198. using HForm.
  199. 6.11
  200. N.B. Count only reports the size of the data, not the actual space used
  201. on the disc. This can only be found by using *FREE from the command line
  202. before and after creating a directory/file and subtracting the values.
  203. 6.11
  204. The structure of !Fonts is where most directories occur. In my case,
  205. there are 111 directories requiring 777Kb of space initially, but since
  206. each contains over 7Kb of data for IntMetrics and Outlines, the space is
  207. not wasted. However, if 28Kb were allocated, as with Steve’s make of
  208. SCSI drive, then 111 × 28 = 3108Kb would be allocated. In my case, only
  209. 2625Kb would be used as font data, losing 483Kb on fonts alone! When
  210. Computer Concepts released Compression, I thought that this would solve
  211. space problems, but I was told by CC that it retains the directory
  212. structure (I assume with the same overheads per directory) and is not
  213. very effective at reducing the disc space taken up by !Fonts.
  214. 6.11
  215. I have now installed SparkFS from David Pilling. Although each compacted
  216. Spark file can contain lots of directories when opened, to the IDE
  217. filing system it is only one file and only allocates one lot of 7Kb (or
  218. 28Kb for Steve). So it is not sensible to have a Spark file containing
  219. less than 7Kb. (The Count facility is misleading as it only gives the
  220. size of compressed data not the space allocated by the IDE drive.) There
  221. is a speed penalty for using a Spark file but there is also a Spark
  222. directory option which is a lot faster according to the booklet although
  223. it seems to have a much larger disc space requirement of about 14Kb
  224. which does not all seem to be recovered.
  225. 6.11
  226. So the conclusions seem to be:
  227. 6.11
  228. 1)    If possible, reformat with the smallest file allocation.
  229. 6.11
  230. 2)    Only create a new directory if you are going to store an amount of
  231. data comparable with the directory space (7Kb for my IDE drive, 28Kb for
  232. Steve’s original SCSI).
  233. 6.11
  234. 3)    Be aware of the overheads due to any compression system you use,
  235. checking by using *FREE at the command line (particularly if it retains
  236. directories.)
  237. 6.11
  238. 4)    If using SparkFS on an A5000, ensure any Spark file will contain
  239. at least 7Kb of data.
  240. 6.11
  241. 5)    If space is tight, remember that a Spark directory will have space
  242. overheads although it is faster.
  243. 6.11
  244. It would be interesting to hear the findings from other people using
  245. other compression systems, types of drive and any information on
  246. reformatting A5000 IDE drives with different file allocation sizes. 
  247. Alan Dawes, Ilford
  248. 6.11
  249. •    Help_ with menus in C − In Archive 6.10 p8, Richard Simpson asks about
  250. using help_ with menus. I enclose a program (on the monthly program
  251. disc) to demonstrate a solution.
  252. 6.11
  253. The program offers help via !Help in the following situations:
  254. 6.11
  255.   •    The main iconbar icon.
  256. 6.11
  257.   •    Menu (with sub-menu) from from the iconbar.
  258. 6.11
  259.   •    Dialogue box from iconbar, including special processing for
  260. version details.
  261. 6.11
  262.   •    A simple window.
  263. 6.11
  264.   •    Menu from the simple window.
  265. 6.11
  266. The program doesn’t actually do anything and is quite long, so I won’t
  267. attempt to explain its operation here. There are a number of comments in
  268. the code which should, hopefully, be sufficient for a C programmer using
  269. help_.
  270. 6.11
  271. The short-hand strings supported by !Help are (this is from !Help’s
  272. message file), note the spaces:-
  273. 6.11
  274. \S  ’Click SELECT to ’
  275. 6.11
  276. \A  ’Click ADJUST to ’
  277. 6.11
  278. \G  ’This option is greyed out because ’
  279. 6.11
  280. \D  ’Drag SELECT to ’
  281. 6.11
  282. \w  ’window’
  283. 6.11
  284. \a  ’ADJUST’
  285. 6.11
  286. \R  ’Move the pointer right to ’
  287. 6.11
  288. \T  ’This is the ’
  289. 6.11
  290. \W  ’This window is ’
  291. 6.11
  292. \d  ’Drag ADJUST to ’
  293. 6.11
  294. \s  ’SELECT’
  295. 6.11
  296. Please bear in mind that the documentation in Release 4 is sketchy and
  297. this may not be Acorn’s preferred solution, but it works. Hope this is
  298. of some use.  Joe Wood, Goring-by-Sea.
  299. 6.11
  300. •    Impression master pages − To create a document with the same master
  301. page as an earlier document in Impression, load the first document, save
  302. a new copy with a new name, create a new chapter with the following
  303. choices: Insert after current chapter / Restart page at 1 / Copy master
  304. page and delete all of the chapters except the new one.  George Foot,
  305. Oxted.
  306. 6.11
  307. •    Numeric resets − I have a 420/1 and, because of lack of space on the
  308. table where the computer lives, the keyboard has to be kept upright
  309. behind the computer when it is not in use. One day, I turned the
  310. computer on and was greeted by a display moving rapidly upwards and
  311. slowly sideways. Adjusting the monitor had no effect. It turned out that
  312. one of the numeric keys was being held down by the corner of the monitor
  313. and the monitor type had been reconfigured as I switched on. So, if you
  314. keep your keyboard upright (yes, I know it’s bad practice, but where
  315. else can I keep it?) and your display goes crazy, try a <numeric> reset
  316. before panicking!  P Young, Cheltenham
  317. 6.11
  318. •    Pocket Book and BJ10ex problems − It appears that the Pocket Book’s
  319. built in Canon BJ10e driver does not work correctly with the Canon
  320. BJ10ex. We have a printer driver (supplied to us from Psion via Richard
  321. Collinson) which works. If you have this printer, send us a formatted
  322. SSD or a disc and your problems will be over. Psion can also supply
  323. other drivers on SSD if necessary.  Simon Moy, Archive.
  324. 6.11
  325. • SigmaSheet revisited − John Waddell’s SigmaSheet fix in last month’s
  326. Hints & Tips requires one more line within DEFPROCexit: *Country UK.
  327. 6.11
  328. •    Solid icons − If the ‘drag solid file icons’ option is set in RISC OS
  329. 3, it causes applications like DrawPlus to reject the file as being of
  330. an incompatible file format. This prevents files being dragged between
  331. applications in the normal way.  Mike McNamara, Dunstable.  A
  332. 6.11
  333. Using RISC OS 3.10
  334. 6.11
  335. Hugh Eagle
  336. 6.11
  337. Neil Dickson asks a jolly good question: have I or Archive ever had any
  338. response from Acorn indicating that they are paying attention to this
  339. column? Well, I haven’t (yet) and I think Paul would have told me if he
  340. had. Surely, it’s inconceivable that Acorn are not interested in the
  341. experiences that have been recounted, the suggestions offered and the
  342. views expressed here. Isn’t it? Perhaps we’ll have some comment for next
  343. month. Let’s wait and see ...
  344. 6.11
  345. RISC OS 4 Wish List (continued)
  346. 6.11
  347. •    Alarm – (a) An option to display the digital clock not on the iconbar
  348. but at the top right corner of the screen in front of all other windows.
  349. (b) An option to set an alarm that goes off after every n (settable)
  350. minutes − to remind you just how much time you are spending on the
  351. machine!!?? (Rex Palmer)
  352. 6.11
  353. •    Shutdown – The <shift-ctrl-F12> routine should dismount any floppy
  354. discs that may be present, then remind the user that they are still
  355. there. (Peter Young)
  356. 6.11
  357. All the following are from Neil Dickson:
  358. 6.11
  359. •    Paint – (a) Allow local fills with the “mask” colour. (b) Use outline
  360. fonts.
  361. 6.11
  362. •    Edit – (a) Use multiple fonts (and maybe accept graphic files: i.e.
  363. have a simple wordprocessing option). (b) Update the font list each time
  364. a new font directory is loaded (like Draw and Impression do.)
  365. 6.11
  366. •    Printers – (a) Put as much as possible of the code into ROM, to save
  367. loading time. (b) A quicker method of “toggling” within !Printers when
  368. deciding which are active and which are inactive.
  369. 6.11
  370. •    Calc – Make it better, but less complicated than SciCalc. (E.g.
  371. include memory buttons and a percentage button, and allow
  372. multiplication, division, etc, by a constant.)
  373. 6.11
  374. •    Draw – (a) Optional detachable toolbox. (b) An option for redefining
  375. the toolbox (e.g. to include zoom and edit tools.) (c) Patterned fills
  376. (hatching, stripes, etc.)
  377. 6.11
  378. •    Tidy windows – Include a “Tidy windows” option on the desktop.
  379. 6.11
  380. •    Filer multitasking – An option to make all filer actions (load and
  381. save, disc mounting, etc) multitask.
  382. 6.11
  383. •    Replacement of system font – Optional replacement of the system font
  384. by an outline font on the desktop (like the Germans seem to have already
  385. in RISC OS 3.12)!
  386. 6.11
  387. •    RMFaster – An option to RMFaster various modules, such as
  388. SharedCLibrary, from the Task Manager (rather than having to type in the
  389. command at the command line).
  390. 6.11
  391. •    Virtual memory – For hard disc users.
  392. 6.11
  393. •    Built in sounds – A greater variety.
  394. 6.11
  395. •    Simpler mode changing – A less fiddly method.
  396. 6.11
  397. •    Keyboard emulation of the mouse – e.g. using <Alt> and the arrow keys.
  398. 6.11
  399. •    Auto-scrolling of font menus – Make the list of fonts scroll
  400. automatically when the pointer reaches the bottom.
  401. 6.11
  402. •    Compression of sprite files – Either in addition to, or instead of,
  403. compression of entire discs, arrange for sprite files to be compressed
  404. always.
  405. 6.11
  406. •    Font management – Put a Font Manager on the icon bar showing a list of
  407. available directories which you can select and deselect by clicking.
  408. (Sounds like !FMaster from Risc User.)
  409. 6.11
  410. Miscellaneous
  411. 6.11
  412. Superfluous icons in template definitions
  413. 6.11
  414. Mick Day has found numerous examples of template definitions in standard
  415. RISC OS 3 applications which contain extra unused icons. The “save”
  416. window in Alarm is just one example: this has four superfluous icons.
  417. (To see for yourself: find the template file inside Resources:$.
  418. Resources, load it into FormEd, use the menu to assign vertical and
  419. horizontal scroll bars and a size icon, then scroll around the window.)
  420. He has also noted inconsistent naming of templates and numbering of
  421. icons. If you use existing windows borrowed from existing applications,
  422. beware that the templates may require more memory than you might expect
  423. because of the space taken by the extra icon definitions and pay close
  424. attention to the icon numbering. As Tim Nicholson comments: it is a
  425. great pity that Acorn did not supply a suitable “clean” set of templates
  426. to work from.
  427. 6.11
  428. “OS_Find” and image filing systems
  429. 6.11
  430. In one of my programs, I need to be able to check that a specified
  431. filing system object (which might be either a file or directory) is
  432. actually present and, in particular, is not on a floppy disc that has
  433. been removed. In RISC OS 2, I found that the following code seemed
  434. fairly foolproof:
  435. 6.11
  436. ON ERROR LOCAL:PROCReport(“Can’t find ”+Object$):ENDPROC
  437. 6.11
  438. SYS “OS_Find”,&40,Object$ TO FileHandle%
  439. 6.11
  440. IF FileHandle%<>0 THEN SYS “XOS_Find”,0,FileHandle%
  441. 6.11
  442. RESTORE ERROR
  443. 6.11
  444. This relied on the fact that the SWI call “OS_Find”,&40 (which is the
  445. general routine for opening a file) should “open” Object$ whether it is
  446. a directory or a file. However, with the arrival of “image” filing
  447. systems such as DOSFS and SparkFS, I found that this wouldn’t work,
  448. because an attempt to “open” a directory inside an image filing system
  449. (e.g. a directory inside a SparkFS archive) resulted in an error
  450. (contrary to the rules set out in the Programmer’s Reference Manual).
  451. 6.11
  452. David Pilling says “there are two entry points to SparkFS, one via the
  453. OS image filing system, the other via a traditional FS entry. The code
  454. in these after the entry point is the same. So it looks like it is the
  455. OS that is faulting your operation and not SparkFS.”
  456. 6.11
  457. I have now rewritten my code so that it checks to see whether Object$ is
  458. a directory and, if it is, it looks inside it for a file and tries to
  459. open that. This seems to work with image filing systems as well as
  460. others, but is a bit cumbersome to say the least (and as David Pilling
  461. observes is still open to being fooled by cacheing). Does anyone know of
  462. a simple and genuinely foolproof way of ensuring that a filing system
  463. object is present?
  464. 6.11
  465. Applications that refuse to Shutdown
  466. 6.11
  467. Keith Gardner has experienced problems with applications that interfere
  468. with the Shutdown process and cause the computer to hang. He refers to
  469. advice in the June issue of Risc User, according to which the Shutdown
  470. routine in RISC OS 3 (which can be selected from the Acorn icon or by
  471. pressing <ctrl-shift-F12>) cannot cope if more than one Run file is open
  472. at the time of Shutdown. Run files are left open while applications are
  473. running if there are any lines after the line that calls RunImage. One
  474. way to avoid the problem is to remove surplus blank lines or lines
  475. containing remarks (prefaced with a | ). However, applications sometimes
  476. contain tidying up commands such as RMKill commands to get rid of
  477. modules: in these cases, it may be necessary to Quit one or more
  478. applications before selecting Shutdown.
  479. 6.11
  480. Matters arising
  481. 6.11
  482. Testing a printer’s on-line status
  483. 6.11
  484. (Archive 6.9 p12) Mick Day found that the printer test routine published
  485. in the June edition of Archive lied! It told him that the printer was
  486. not on line whether it was or not, and the printer beeped if it was on
  487. line. Tim Nicholson says that the routine (as previously published) can
  488. fail for two reasons: Firstly, it assumes a printer buffer of 1024
  489. bytes, but the actual size depends upon the setting of *Configure
  490. PrinterBufferSize, which may be different from the default of 1Kb.
  491. Secondly, the first line of the program redirects the whole output
  492. stream to the printer, thus if the program is run from the desktop, the
  493. output which normally goes to the Task window that the desktop
  494. generates, goes to the printer instead as well as the test byte of
  495. CHR$(0). Typically this stream will contain several control codes to
  496. open the task window display and the Task window title, e.g. RUN
  497. ADFS::DiscName.$.PrintTest. Although this stream is sent before running
  498. the program, the FX 3 call at the top of the program is executed in time
  499. to redirect this part way through and upset the printer.
  500. 6.11
  501. Tim suggests the following variant of the routine:
  502. 6.11
  503. *FX21,3
  504. 6.11
  505. empty%=ADVAL(-4)
  506. 6.11
  507. PRINT “Printer is ”;
  508. 6.11
  509. *FX3,10
  510. 6.11
  511. PRINTCHR$(0);
  512. 6.11
  513. a%=INKEY(20)
  514. 6.11
  515. a%=ADVAL(-4)
  516. 6.11
  517. *FX3,0
  518. 6.11
  519. *FX21,3
  520. 6.11
  521. IF a%<>empty% THEN
  522. 6.11
  523. PRINT “not on line”
  524. 6.11
  525. ELSE PRINT “on line”
  526. 6.11
  527. ENDIF
  528. 6.11
  529. END
  530. 6.11
  531. This deals with the first problem by comparing the buffer length
  532. immediately after flushing with the length after inserting the test byte
  533. and pausing to allow throughput, and with the second by including a
  534. PRINT statement before redirecting the output stream.
  535. 6.11
  536. Tim notes that the original program would run correctly (subject to the
  537. buffer size being correct) from the command line, i.e. after pressing
  538. <f12>, and CHAINing or LOADing and RUNning.
  539. 6.11
  540. Tim does not understand the supposed warning from Acorn about the use of
  541. ADVAL(−4) (see Archive 6.7 p41) since it is a use specified in the Basic
  542. manual. He can only assume it is a confusion with the use of positive
  543. ADVAL parameters, which are only meaningful if a podule with an analogue
  544. input which mimics that of the original BBC Micro is fitted. He has
  545. experienced no difficulties using negative ADVAL parameters to inspect
  546. the condition of buffers and is not aware of any differing action under
  547. RISC OS 3.1x as opposed to 2.0 with this facility.
  548. 6.11
  549. Basic program compaction
  550. 6.11
  551. (Archive 6.9 p65) Rex Palmer says that in his experience compacted
  552. programs only cause problems when you try to alter them. The problem
  553. seems to occur with both Edit and BasicEdit. If a compacted program is
  554. loaded into either of these and any alterations made, then when the
  555. program is re-saved, the line that has been altered will generate the
  556. error even if the resulting error is not part of the line that was
  557. altered!
  558. 6.11
  559. Altering the keyboard status
  560. 6.11
  561. (Archive 6.8 p27 and 6.9 p65) Rex Palmer has written to explain the
  562. purpose of bit 7 (the “Shift enable” bit) of the keyboard status byte.
  563. When this bit is set, the <Shift> key reverses the action of the
  564. <CapsLock> key. Thus, if you hold down <Shift> while pressing <CapsLock>
  565. then release both keys, you put the computer in a state where pressing
  566. the <Shift> key with a letter key gives you lower case letters. The
  567. computer can be configured to start up in this state. Alternatively, the
  568. command *FX202,128,111 will achieve the same effect ... since 111 = 255
  569. − 128 − 16 the command sets bit 7 (Shift Enable on) and unsets bit 4
  570. (Caps Lock on).
  571. 6.11
  572. To recap, the most useful commands are likely to be:
  573. 6.11
  574. *FX202,0,239 to set Caps Lock on
  575. 6.11
  576. *FX202,16,239 to set Caps Lock off
  577. 6.11
  578. *FX202,128,111 to select ShiftCaps
  579. 6.11
  580. Programmer’s Reference Manual
  581. 6.11
  582. The increase in the number of pages is not “nearly 50%”, as I said last
  583. month, but is in fact over 70% (excluding the indexes, there were 1,882
  584. pages in the RISC OS 2 manual and there are over 3,200 in the new
  585. edition.) Sorry about the mistake!
  586. 6.11
  587. Arm3 hare and tortoise (again)
  588. 6.11
  589. (Archive 6.6 p59, 6.8 p30 and 6.10 p63) With the help of Jim Nottingham,
  590. I have found out the source of my problem. The Run file of the Aleph One
  591. !Arm3 application should read:
  592. 6.11
  593. IconSprites <Obey$Dir>.!Sprites
  594. 6.11
  595. |Use only one of the lines
  596. 6.11
  597. |below, comment out the other.
  598. 6.11
  599. |Load <Obey$Dir>.CMdlUnix
  600. 6.11
  601. Load <Obey$Dir>.CacheMdl
  602. 6.11
  603. Load <Obey$Dir>.IconMdl
  604. 6.11
  605. <Obey$Dir>.Kick CacheIcon
  606. 6.11
  607. In my file, the CacheMdl line had somehow got REM’d out. I vaguely
  608. remember that when I first tried to install !Arm3 with RISC OS 3, I read
  609. the instruction about “using only one of the lines below” as meaning
  610. that only one of the following three lines should be used and, since I
  611. assumed that I no longer needed “CacheMdl” because RISC OS 3 now had a
  612. module to deal with this, I removed it as well as the CMdlUnix line. On
  613. looking at the file again, I now presume that you are only supposed to
  614. remove one of these two lines, so I have reinstated the CacheMdl line
  615. and everything seems fine. A case of trying to be too clever, it seems.
  616. 6.11
  617. Redraw problems (and an alternative)
  618. 6.11
  619. (Archive 6.8 p29 and 6.10 p63) Richard Hallas confirms that the problem
  620. of incorrect screen redrawing in Edit and DeskEdit is indeed due to a
  621. bug in the Shared C Library and that the problem seems to occur with
  622. particularly long lines. He says that any program which uses the C
  623. library’s text object feature will suffer from the bug until Acorn
  624. corrects it in a future version of CLib. He adds that Acorn has been
  625. aware of the problem for some time, so hopefully a fix should not be too
  626. far off.
  627. 6.11
  628. Richard used to use DeskEdit to produce files for input to PMS which
  629. frequently involved very long input lines indeed (up to several hundred
  630. characters). He would occasionally reposition the caret and start
  631. typing, only to find that his input had gone into a separate part of the
  632. file which was not on the screen! Partly because of this bug, he has now
  633. moved over to using the public domain text editor, Zap, which he
  634. thoroughly recommends: “It has its own redraw routines, which are
  635. unbelievably fast and totally accurate: plus you can get twice as much
  636. text on the screen in multisync modes.”  A
  637. 6.11
  638.